<?php

// print_r($_POST);
$data = json_decode( file_get_contents("../../dir/data.json"),true);
// echo $data;
// print_r($data);
array_push($data,$_POST);
// print_r($data);
$res =  file_put_contents("../../dir/data.json",json_encode($data));
if($res){
	// echo "添加成功";
	echo "<script>alert('添加成功');window.location.href='../addNews.html'</script>";
}else{
	echo "添加失败";
}




?>